import React,{useState} from "react";


export default function App(){

 const [name ,setName]=useState(0)
 var count=0
    return (
        <div>
            <button onClick={()=>{
                setName(name+1)
                count++
            }}>点击改变</button><br/>
            计数器：{name}-{count}
        </div>
    )
}